package com.just.recruitback.controller;


import com.just.recruitback.entity.Information;
import com.just.recruitback.service.InformationService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author baibaiwuchang
 * @since 2020-07-05
 */
@RestController
@RequestMapping("/information")
public class InformationController {
    @Resource
    private InformationService informationService;

    @GetMapping("/one")
    public Information getOneById(int userId) {
        return informationService.getOne(userId);
    }

    @PutMapping("/save")
    public void saveInformation(@RequestBody Information information) {
        informationService.save(information);
    }
}
